<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/8
 * Time: 16:07
 */
namespace test\primary;

include 'mate_cookie.php';

$mate_cookie=new mate_cookie();

$pd=$mate_cookie->mate();



?>

<!DOCTYPE html>
<html>
	<body>
		<form action="change_pwd_.php" method="post" enctype="multipart/form-data">
			<table>
				<tr>
					<td>请输入旧密码:</td>
					<td><input type="" name="old_pwd" id="" value="" /></td>
				</tr>
				<tr>
					<td>请输入新密码:</td>
					<td><input type="" name="new_pwd_1" id="" value="" /></td>
				</tr>
				<tr>
					<td>请再次输入新密码:</td>
					<td><input type="" name="new_pwd_2" id="" value="" /></td>
				</tr>
			</table>
			<input type="submit" value="提交修改" />
		</form>
	</body>
	<script>
		switch (<?php echo $pd ?>) {
			case 1:
				alert('你还没登陆或者cookie失效');
				window.location.href = 'login.php';
				break;
			case 2:
				alert('cookie匹配失败');
				window.location.href = 'login.php';
				break;
			case 3:
				alert('cookie到期');
				window.location.href = 'login.php';
				break;
		}
	</script>
</html>
